let path = require('path');
let enterFilePath = path.join(__dirname,'main.ts');
module.exports = {
    mode: 'development',
    entry: enterFilePath,
    output: {
        path: path.resolve(__dirname,'dist'),
        filename: 'bundle.js',
    },
    module: {
        rules: [  // 添加解析规则
            {
                test: /\.tsx?$/,
                loader: 'ts-loader',
                // exclude: /node_modules/,
            },
        ]
    },
    resolve: {   // 需要打包的文件后缀
        extensions: [".tsx", ".ts", ".js"]
    },
    watch: true,
};
